// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'


/**
 * 通过登录的用户查询部门列表
 * @param params
 * @returns {*}
 */
export function getDeptList() {
  return request({
    url: `/dept/selectDeptAll`,
    method: 'get'
  })
}

export function deptList() {
  return request({
    url: `/dept/deptList`,
    method: 'get'
  })
}

export function pageGetDept(index) {
  return request({
    url: `/dept/pageGetDept`,
    method: 'post',
    params:{
      index
    }
  })
}

export function updateDept(data) {

  return request({
    url: '/dept/updateDept',
    method: 'put',
    data
  })
}
